import React from 'react';
import { useNavigate } from 'react-router-dom';
import './Unauthorized.css';

const Unauthorized = () => {
  const navigate = useNavigate();

  return (
    <div className="unauthorized-container">
      <h1>访问受限</h1>
      <p>抱歉，您没有权限访问此页面</p>
      <button onClick={() => navigate(-1)}>返回上一页</button>
      <button onClick={() => navigate('/login')}>去登录</button>
    </div>
  );
};

export default Unauthorized;